#include <myheader_c_plus.h>
#include <map>
using std::map;
using std::cout;
using std::endl;
using std::string;
template<typename Container>
void display(Container & con){
    for(auto & ele : con){
        cout << ele.first << " : " << ele.second;
    }
    cout << endl;
}
void test(){
    map<int,string> city = {
        {1,"shanghai"},
        {2,"ningbo"},
        {0,"shenzhen"},
        std::make_pair(5,"qingdao"),
        std::pair<int, string>(3,"guangzhou"),
        std::pair<int, string>(6,"beijing"),
        {0,"jinan"}
    };
    display(city);
    cout << city.count(0) << endl;
    cout << city[3] << endl;
    cout << city[11] << endl;
    cout << "===============" << endl;
    auto it = city.lower_bound(3);
    cout << it->second << endl;
    cout << "==============" << endl;
    auto first = city.find(3);
    auto last = city.find(6);
    city.erase(first, last);
    display(city);


}
class Point{
public:
    Point(int x, int y)
    :_x(x)
    ,_y(y)
    {

    }

    


private:
    int _x;
    int _y;
};
void test2(){

/*
 *     map<int, Point> points = {
 *
 *     }
 */

}
int main(int argc, char *argv[])
{
    test();
    return 0;
}

